package pizza2;

/**
 * @Auther: xiaofei
 * @Date: 2021/6/8 - 06 - 08 - 9:42
 * @Description: pizza2
 * @version: 1.0
 */
public class Pizza {
    //属性
    private String name;
    private int size;
    private double price;
    //方法

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
    //展示披萨信息
    public String showPizza(){
        return "披萨的名字是："+name+"\n披萨的大小为："+size+"\n披萨的价格为："+price;
    }
    //构造器
    public Pizza() {
    }

    public Pizza(String name, int size, double price) {
        this.name = name;
        this.size = size;
        this.price = price;
    }

}
